#ifndef DRV_UART3_H
#define DRV_UART3_H

#include "main.h"
#include "gd32f4xx_usart.h"

typedef enum
{
    parity_NONE,
    parity_ODD,
    parity_EVEN,
}uart_parity_t;

typedef enum
{
    stop_bit_1,
    stop_bit_0_5,
    stop_bit_2,
    stop_bit_1_5,
}uart_stop_bit_t;

typedef enum
{
    data_bit_8,
    data_bit_9,
}uart_data_bit_t;

void rs485_init(uint32_t baud,uint8_t parity,uint8_t stop_bit,uint8_t data_bit);
/**
 * @brief 485发送函数
 * [param in] *p_buff 发送数据指针
 * [param in] data_len 发送长度
*/
void rs485_send_byte(uint8_t *p_buff, uint32_t data_len);
#endif





